<?php
use yii\helpers\Url;

$web = Url::base();

?>
<script type="application/javascript">

    $(function ($) {
        loading.hide();

        totalPage =<?=$paginationDetail['totalPage']?>;
        detailPage =<?=$paginationDetail['page']?>;

        $("#prePage").css("visibility", "show");
        $("#nextPage").css("visibility", "show");
        if (totalPage < 2) {
            $("#prePage").css("visibility", "hidden");
            $("#nextPage").css("visibility", "hidden");
        } else if (detailPage == 1) {
            $("#prePage").css("visibility", "hidden");
        } else if (detailPage == totalPage) {
            $("#nextPage").css("visibility", "hidden");
        }

        //翻页
        $("#prePage").click(function () {
            detailPage = detailPage - 1;
            searchIntegral(1);
        });
        $("#nextPage").click(function () {
            detailPage = detailPage + 1;
            searchIntegral(1);
        });

    });



</script>


<div class="table-responsive">
    <table class="table table-bordered table-hover table-condensed"
           id="institutionTable">
        <thead>
        <tr>
            <th>时间</th>
            <th>类型</th>
            <th>数值</th>
        </tr>
        </thead>
        <tbody>
        <?php
        for ($i = 0; $i < count($record); $i++) {
            ?>
            <tr>
                <td><?= $record[$i]['time'] ?></td>
                <td><?php if($record[$i]['remark']!=''){
                        $record[$i]['type']=$record[$i]['type'].'【'.$record[$i]['remark'].'】';
                    }
                    ?>
                    <?= $record[$i]['type'] ?>
                </td>
                <td><?= $record[$i]['integral'] ?></td>
            </tr>
            <?php
        }
        ?>
        </tbody>
    </table>
</div>
<!--<div class="pull-left">
            <? /*= \yii\widgets\LinkPager::widget(['pagination' => $paginationDetail]) */ ?>
        </div>-->
<div class="row">
    <div class="pull-right">
        <ul class="pager">
            <li><a id="prePage">上一页</a></li>
            <li><a id="nextPage">下一页</a></li>
        </ul>
        <!--<button class="btn btn-link" type="button" onclick="goback()"> 《返回
        </button>-->
    </div>
</div>
